package com.guigu.www.controller;


import com.guigu.www.pojo.Menu;
import com.guigu.www.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author DengHao
 * @since 2021-10-20
 */
@RestController
@RequestMapping("/CommonMenu")
public class MenuController {

    @Autowired
    private MenuService menuService;

    @PostMapping("/showUserMenu/{roleId}")
    public List<Menu> showUserMenu(@PathVariable Integer roleId){
        return menuService.showUserMenu(roleId);
    }
}

